package com.example.demo.entity;

import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;

import java.math.BigDecimal;

@Data
@TableName("order_items")
public class OrderItem {
    
    @TableId(value = "item_id", type = IdType.AUTO)
    private Integer itemId;
    
    @TableField("order_id")
    private Integer orderId;
    
    @TableField("product_id")
    private Integer productId;
    
    @TableField("quantity")
    private Integer quantity;
    
    @TableField("price")
    private BigDecimal price;
    
    @TableField("subtotal")
    private BigDecimal subtotal;
    
    @TableField(exist = false)
    private Product product;
} 